package swf;

class Header extends String {
	public function new ( bytes : Int, width : Int, height : Int ) {
		var sig = "FWS";
		var version = UI8.fromInt( 9 );
		var length = UI32.fromInt( bytes );
		var size = Rectangle.fromTwips( 0, 0, width, height );
		var frameRate = UI16.fromInt( 21 << 8 );
		var frameCount = UI16.fromInt( 1 );
		
		super( sig + version + length + size + frameRate + frameCount );
	}
	
	public function toString () : String {
		return this;
	}
}
